package com.jpa.element.collections.mappings.tutorial.domain;

import javax.persistence.Column;
import javax.persistence.Embeddable;

@Embeddable
public class Event {

    @Column(name = "event_year")
    private int year;

    @Column(name = "event_description")
    private String description;

    public Event() {

    }

    public Event(int year, String description) {
        this.year = year;
        this.description = description;
    }

    @Override
    public String toString() {
        return "Event{" +
                "year=" + year +
                ", description='" + description + '\'' +
                '}';
    }
}
